﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.ComponentModel;
using System.Web.Security;
using WebComponents.ITemplates;
using System.Runtime.InteropServices;
using System.Reflection;

namespace WebComponents.Security
{
    public class CustomMembership
    {

        #region GetUser

        public static List<IUsers> GetUser()
        {
            return UserData(Membership.GetUser());
        }
        public static List<IUsers> GetUser(string UserName)
        {
            return UserData(Membership.GetUser(UserName));
        }
        public static List<IUsers> GetUser(Guid UserID)
        {
            return UserData(Membership.GetUser(UserID));
        }

        public static List<IUsers> UserData(MembershipUser user)
        {
            List<IUsers> list = new List<IUsers>();
            list.Add(new IUsers
            {
                UserID = new Guid(user.ProviderUserKey.ToString()),
                UserName = user.UserName
            });
            return list;
        }

        #endregion


    }
}
